﻿namespace CodeDDD.Domain.Seedwork
{
    using System;

    /// <summary>
    /// Contract for UnitOfWork pattern
    /// </summary>
    public interface IUnitOfWork : IDisposable
    {
        /// <summary>
        /// Begin the work (transaction) in a container
        /// </summary>
        void BeginWork();

        /// <summary>
        /// Commit all changes made in a container
        /// </summary>
        void Commit();

        /// <summary>
        /// Rollback changes that are yet not stored in the container
        /// </summary>
        void RollbackChanges();
    }
}
